﻿<script type="text/javascript">
	$(function() {
		$( "#menu" ).menu();
	});
</script>
<style>
	.ui-menu { width: 208px; white-space:nowrap;}
	.menuraovat{ border:none; margin:-15px 0px 10px 0px;}
</style>
<ul id="menu" class="menuraovat">
	<?php 
	foreach($menus as $item)
	{
			$arr_ids = array();
			if(isset($arr_id[$item->id]))
				$arr_ids = $arr_id[$item->id];
			$dem = count($arr_ids);
			//khong dau
			$arr_kds = array();
			if(isset($arr_kd[$item->id]))
				$arr_kds = $arr_kd[$item->id];
			//Tieu de
			$arr_tens = array();
			if(isset($arr_ten[$item->id]))
				$arr_tens = $arr_ten[$item->id];
		?>
        <li style="list-style:none;">
            <a href="#">
            <span style="float:left; width:20px;"><img style="border:none;" title="San giao dich" alt="san giao dich" width="16" height="16" src="<?=base_url()?>files/icon/<?=$item->icon;?>" /></span>
			<span><?=$item->tieude;?></span>
            </a>
            <?php if($dem >0){?>
                <ul class="child">
                	<?php foreach($arr_ids as $k=>$v){?>
                    	<li style="list-style:none;"><a href="#"><?=$arr_tens[$v];?></a></li>
                    <? }?>
                </ul>
            <? }?>
        </li>
     <?php }?>
</ul>